$(document).ready(function(){
		$('#datepicker').datepicker();
	});
function pre_download(src){
	$("#now_download").attr("action",src);
}
function after_download(base_url){
	var use_school = $("#use_school").val();
	var datepicker = $("#datepicker").val();
	if(use_school == "") {
		$("#download_error p").html("请填写用于高校！");
		$("#download_error").show();
		document.onsubmit = function(){return false;}
		return false;
	}
	else {
		$("#download_error p").html("");
		$("#download_error").hide();
	}
	if(datepicker == "") {
		$("#download_error p").html("请填写锁定截止时间！");
		$("#download_error").show();
		document.onsubmit = function(){return false;}
		return false;
	}
	else {
		$("#download_error p").html("");
		$("#download_error").hide();
	}

	if(!confirm('确认锁定下载吗？')) document.onsubmit = function(){return false;}
	else {
		document.onsubmit = function(){return true;}
		$("#canner_modal").click();
		var link = location.href;
		setTimeout('document.forms[0].action="'+link+'";document.forms[0].submit();',1000);
	}
	
}